package cn.laiguowei.May3.MD5Signature.configuration;

import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

@Component
@Log
public class AfterRefresh implements ApplicationListener {

    @Autowired
    StringRedisTemplate redisTemplate;

    public void onApplicationEvent(ApplicationEvent applicationEvent) {
//        redisTemplate.opsForValue().set("may3","may3",60, TimeUnit.SECONDS);
//        log.info(redisTemplate.opsForValue().get("may3"));
    }
}
